package com.javainterface.controller;

import com.javainterface.service.FileReadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 文件在线预览控制层
 */
@Controller
@RequestMapping("/file")
public class FileReadController {

    @Autowired
    FileReadService fileReadService;

    @PostMapping("/fileRead")
    @ResponseBody
    public String fileReadHtml(String downloadUrl){
        String returnJson=fileReadService.fileReadServer(downloadUrl);
        return returnJson;
    }
}
